#include "Schedule.h"

Schedule::Schedule( QWidget* parent )
	: QTabWidget( parent )
{
	mScene = new QGraphicsScene( 0, 0, 850, 2500, this );
	mScene->setBackgroundBrush( Qt::black );
	addTab( new QGraphicsView( mScene, this ), "Schedule" );

	mLog = new QTextEdit( this );
	addTab( mLog, "Log" );
}

Schedule::~Schedule()
{
}

void 
Schedule::setItems( const QList<ScheduleItem*>& items )
{
	QMessageBox m;
	m.setText( tr( "Set Items " ) + QString::number( items.size() ) );
	m.exec();

	mScene->clear();
	
	for( int i = 0; i < items.size(); ++i ) 
	{
		mScene->addItem( items.at( i ) );
	}
}